package com.chixing.day06_static.abstract_demo;

import java.util.Calendar;

public class AccountTest {
    public static void main(String[] args) {
        SavingAccount sa=new SavingAccount();
        CreditAccount ca=new CreditAccount();

        //不具有实际的业务意义
        Account account= new Account() {
            @Override
            public double depoist(double moey) {
                return 0;
            }
        };

        Calendar c=Calendar.getInstance();
        System.out.println(c.get(Calendar.HOUR_OF_DAY));

        //多态
        //父类引用子类对象
        Account account1=new SavingAccount();
        //子类重写父类的方法
        account1.depoist(500);

    }
}
